***************************************************************
HiMIPv6 Project 
Installation Guide for Correspondent Node

By Chung-Chun Huang, Cheng-Wei Lee, Fan Liu, and 
Professor Yeali S. Sun
***************************************************************

0. Install RedHat 7.2,including the kernel source on your machines. 
	We recommand that you choose LILO to be boot manager.
	
	Copy the entire data on the HiMIPv6_Install_packages to SOMEWHERE.
	We STRONGLY recommand that SOMEWHERR = /root
	

1. Patch MobileIPv6/HiMIPv6 patch file, and make new kernel

	a. Backup Liuux source(Optional)
		# tar -zcvf /usr/src/linux-2.4.7-10.tgz /usr/src/linux-2.4.7-10

	b. Generate the file: /usr/src/linux-2.4/.config
		# cd /usr/src/linux-2.4.7-10
    	# make menuconfig
    	Make no changes. Save and Exit.

	c. Patch MobileIPv6
		# cd SOMEWHERE
		# tar -zxvf mipv6-0.9-v2.4.7.tar.gz
		# cp SOMEWHERE/mipv6-0.9-v2.4.7/mipv6-0.9-v2.4.7.patch /usr/src/linux-2.4.7-10
		# cd /usr/src/linux-2.4.7-10
		# patch -p1 < mipv6-0.9-v2.4.7.patch

	d. Patch HiMIPv6 
		# cp SOMEWHERE/HiMIPv6_HACNMN-v2.4.7.patch /usr/src/linux-2.4.7-10
		# cd /usr/src/linux-2.4
		# patch -p1 < HiMIPv6_HACNMN-v2.4.7.patch

	e. Have the kernel modules needed selected
		# cd /usr/src/linux-2.4.7-10
		# make menuconfig
		In 'Networking Options -->', select 'IPv6: Mobility Support (EXPERIMENTAL)'.
		Also select 'MIPv6: HiMIPv6(EXPERIMENTAL)' and 'IPv6: MIPv6 ReceiverHomeAddress Option Support'.

	f. Make kernel
		# cd /usr/src/linux-2.4.7-10
		# make clean;make oldconfig;make dep;make bzImage
		# cp arch/i386/boot/bzImage /boot/HiMIPv6-2.4.7
		Add the new kernel image 'HiMIPv6-2.4.7' to boot manager
	
		If you choose LILO to be boot manager, edit '/etc/lilo.conf'.
		The file may be modified and looked like 'SOMEWHERE/lilo.conf'
		After modifying lilo.conf,
		# lilo
		
	g.
		# make modules
		# reboot
		Use HiMIPv6-2.4.7 kernel image to boot.
		# cd /usr/src/linux-2.4.7-10
		# make modules_install	

	h. Install mipdiag tool
		# cd SOMEWHERE/mipv6-0.9-v2.4.7/userspace/
		# ./configure
		# make;make install
		# mknod /dev/mipv6_dev c 0xf9 0
	
	i. Patch mipdiag tool
		# cp SOMEWHERE/mipdiag.c SOMEWHERE/mipv6-0.9-v2.4.7/userspace/
		replace the original file
		# make;make install



2BInstall the usagi package(include ping6,telnet for IPv6v6, ftp for IPv6, radvd...)

	a. Extract usagi-linux24-s20020930.tar.bz2
		# cd SOMEWHERE
		# bzip2 -cd usagi-linux24-s20020930.tar.bz2 | tar xvf -
		
	b. Install
		# cd SOMEWHERE/usagi
		# make prepare TARGET=linux24
		# cd SOMEWHERE/usagi/usagi
		# ./configure
		# make;make install
		
	c. Copy the inetd deamon configuration file to /etc
		# cp SOMEWHERE/usagi/usagi/inetd/etc/inetd.conf.sample /etc/inetd.conf
		


3BInstall SNMP Manage System(Optional)

	a. Extract and install net-snmp-5.0.3.tar.gz
		# cd SOMEWHERE
		# tar -zxvf  net-snmp-5.0.3.tar.gz
		# cp SOMEWHERE/mibHiMIPv6.c  SOMEWHERE/net_snmp_5.0.3/agent/mibgroup
		# cp SOMEWHERE/mibHiMIPv6.h  SOMEWHERE/net_snmp_5.0.3/agent/mibgroup
		# cd SOMEWHERE/net_snmp_5.0.3
		#./configure -with-mib-modules="mibHiMIPv6"
		Answer every question by pressing Enter
		
		# make ; umask 022 ;make install
		
		Add a file named 'snmpd.conf' in '/usr/local/share/snmp/',
		containing the following words:

		 rocommunity public
		 rwcommunity private	


	We choose Correspondient Node to be HiMIPv6 SNMP MANAGER.
	
	b. Extract and install ucd-snmp-4.2.6.tar.gz
		# cd SOMEWHERE
		# tar -zxvf  ucd-snmp-4.2.6.tar.gz
		# cd ucd-snmp-4.2.6
		# ./configure
		Answer every question by pressing Enter
		# make ; umask 022 ;make install
		
		
	d. Install Apache http deamon
		# cd SOMEWHERE
		# tar zxvf httpd-2.0.47.tar.gz
		# cd httpd-2.0.47
		# ./configure --prefix=/usr/local/apache2
		# make;make install


	e. Copy the java applet for SNMP MANAGER Client web pages
		# cd SOMEWHERE
		# tar zxvf HiMIPv6-SNMP-CLIENT.tgz
		# mv SOMEWHERE/HiMIPv6-SNMP-CLIENT /usr/local/apache2/htdocs/
	

	f. Compile HiMIPv6-SNMP-MANAGER on the machine you choose to be the SNMP Manager
		(We STRONGLY recommand that you install the SNMP Manager on Correspondent Node)
		# cd SOMEWHERE
		# tar zxvf HiMIPv6-SNMP-MANAGER.tgz
		# cd HiMIPv6-SNMP-MANAGER
		# make
		
		
4. Final configuration
	# cp SOMEWHERE/hosts /etc/hosts
	overwrite it
	
	# chmod 755 SOMEWHERE/CN/CorrespondentNode.sh

	After Correspondent Node booted, use
	# SOMEWHERE/CN/CorrespondentNode.sh
	to get HiMIPv6 test bed ready
